import React, { Component } from 'react'

export default class Text2 extends Component<any> {
    constructor(props:any){
        super(props)
    }
    componentDidMount(){
        if(!this.props.location.state){
            this.props.history.push("/about")
        }
    }
  render() {
    if(!this.props.location.state){
        this.props.history.push("/about")
    }
    return (
      <div>Text2{this.props.location.state?.id}</div>
    )
  }
}
